<?php
// +----------------------------------------------------------------------
// | ThinkBLOG (Build on ThinkPHP)
// +----------------------------------------------------------------------
// | @link ( http://www.yurnero.net )
// +----------------------------------------------------------------------
// | @licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | @author nicholas <nicholasinlove@126.com>
// +----------------------------------------------------------------------
// | $Id: OptionsModel.class.php 43 2011-09-30 10:11:10Z nicholasinlove1986@gmail.com $
// +----------------------------------------------------------------------


class CommonModel extends Model {
	
	public function getListByMap($map = array(), $field = '*', $order = '', $limit = '') {
		return $this->where ( $map )->field ( $field )->order ( $order )->limit ( $limit )->select ();
	}
	
	public function getOneByMap($map = array(), $field = '*') {
		return $this->where ( $map )->field ( $field )->find ();
	}

}